package org.spider.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author lzy
 * @since 2022-06-02 15:36:47
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("spider_log_task")
@ApiModel(value = "SpiderLogTaskEntity对象", description = "")
public class SpiderLogTaskEntity extends Model<SpiderLogTaskEntity> {

    @ApiModelProperty("主键id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty("任务日志编码")
    @TableField("state_id")
    private String stateId;

    @ApiModelProperty("关联站点id")
    @TableField("site_id")
    private Long siteId;

    @ApiModelProperty("关联频道id")
    @TableField("channel_id")
    private Long channelId;

    @ApiModelProperty("关联频道id")
    @TableField("article_id")
    private Long articleId;

    @ApiModelProperty("任务配置关联id")
    @TableField("task_config_id")
    private Long taskConfigId;

    @ApiModelProperty("任务批次")
    @TableField("batch")
    private Long batch;

    @ApiModelProperty("任务父级批次")
    @TableField("parent_batch")
    private Long parentBatch;

    @ApiModelProperty("节点id")
    @TableField("node_id")
    private Long nodeId;

    @ApiModelProperty("创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;


    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
